package models;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;

@Entity
@PrimaryKeyJoinColumn(name="id", referencedColumnName="id")
public class CommentTopic extends Comment {
	
	@ManyToOne
	private Topic topic;
		
	public CommentTopic(User user, String comment, Topic topic) {
		super(user, comment);
		this.topic = topic;
	}

	public Topic getTopic() {
		return topic;
	}

	public void setTopic(Topic topic) {
		this.topic = topic;
	}	
	
}
